package com.xiaozhengkeji.minecraft.plugin.fishplus;


import com.xiaozhengkeji.minecraft.plugin.fishplus.base.MemoryBase;
import me.clip.placeholderapi.PlaceholderHook;
import org.bukkit.entity.Player;

public class PlaceholderAPIHook extends PlaceholderHook {
    @Override
    public String onPlaceholderRequest(Player player, String params) {
        if (params.equalsIgnoreCase("fishing_max")) {
            return String.valueOf(MemoryBase.PLAYER_CUSTOM_FISH_LISTENER_HASH_MAP.get(player.getUniqueId()).PlayerDataEntity.MaxNumFishing);
        } else if (params.equalsIgnoreCase("fishing_success")) {
            return String.valueOf(MemoryBase.PLAYER_CUSTOM_FISH_LISTENER_HASH_MAP.get(player.getUniqueId()).PlayerDataEntity.MaxNumFishing_Success);
        }
        return super.onPlaceholderRequest(player, params);
    }
}
